<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心 - ${site.name} - Powered by JEECMS</title>
<link href="${resSys}/front.css" rel="stylesheet" type="text/css"/>
<script src="${resSys}/jquery.js" type="text/javascript"></script>
<script src="${resSys}/front.js" type="text/javascript"></script>
<script src="${base}/thirdparty/fckeditor/fckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
$.validator.methods.leafChannel = function(value, element, param) {
	var i = element.selectedIndex;
	return $(element.options[i]).attr("class")!="sel-disabled";
}
$(function() {
	$("#jvForm").validate({
		rules: {
			channelId: {
				required: true,
				leafChannel: true
			}
		},
		messages:{
			channelId: {
				leafChannel: "请选择末级栏目"
			}
		}
	});
});
</script>
<style type="text/css">
.sel-disabled{background-color:#ccc}
</style>
</head>

<body>
<h1>会员中心</h1>
<p>欢迎您：${user.username}</p>
[#include "会员中心页_导航.html"/]
[#if channelList?size gt 0]
<form id="jvForm" action="contribute_save.jspx" method="post">
<p>标题：<input type="text" name="title" maxlength="150" class="required"/></p>
<p>TAGS：<input type="text" name="tagStr" maxlength="255"/> 用,分割</p>
<p>作者：<input type="text" name="author" maxlength="100"/></p>
<p>栏目：
<select name="channelId">
	<option value="" class="sel-disabled">--请选择--</option>
[#if channelList?size gt 0]
[#assign origDeep=channelList[0].deep+1/]
[#list channelList as c]
	<option value="${c.id}"[#if c.child?size gt 0] class="sel-disabled"[/#if]>[#if c.deep gte origDeep][#list origDeep..c.deep as i]&nbsp;&nbsp;[/#list]>[/#if]${c.name}</option>
[/#list]
[/#if]
</select>
</p>
<p>摘要：<textarea name="description" rows="3" cols="70" maxlength="255"/></textarea></p>
<p>内容：
<script type="text/javascript">
[#assign editorBasePath="${base}/thirdparty/fckeditor/" filemanager="${editorBasePath}editor/filemanager/browser/default/browser.html"/]
var txt = new FCKeditor("txt");
txt.BasePath = "${editorBasePath}";
txt.Config["CustomConfigurationsPath"]="${base}/thirdparty/fckeditor/myconfig.js";

txt.Config["LinkBrowser"] = false ;
txt.Config["ImageBrowser"] = false ;
txt.Config["FlashBrowser"] = false ;
txt.Config["MediaBrowser"] = false ;

txt.Config["LinkBrowserURL"] = "${filemanager}?Connector=${base}/fck/connector.jspx" ;
txt.Config["ImageBrowserURL"] = "${filemanager}?Type=Image&Connector=${base}/fck/connector.jspx" ;
txt.Config["FlashBrowserURL"] = "${filemanager}?Type=Flash&Connector=${base}/fck/connector.jspx" ;
txt.Config["MediaBrowserURL"] = "${filemanager}?Type=Media&Connector=${base}/fck/connector.jspx" ;

txt.Config["LinkUpload"] = true ;
txt.Config["ImageUpload"] = true ;
txt.Config["FlashUpload"] = true ;
txt.Config["MediaUpload"] = true ;

txt.Config["LinkUploadURL"] = "${base}/fck/upload.jspx" ;
txt.Config["ImageUploadURL"] = "${base}/fck/upload.jspx?Type=Image" ;
txt.Config["FlashUploadURL"] = "${base}/fck/upload.jspx?Type=Flash" ;
txt.Config["MediaUploadURL"] = "${base}/fck/upload.jspx?Type=Media" ;

txt.ToolbarSet="My";
txt.Height=200;
txt.Create();
</script>
</p>
<p>验证码：<input type="text" name="captcha" class="required"/> <img src="${base}/captcha.svl" onclick="this.src='${base}/captcha.svl?d='+new Date()"/></p>
<p>
	<input type="hidden" name="nextUrl" value="contribute_list.jspx"/>
	<input type="submit" value="提交"/> <input type="reset" value="重置"/>
</p>
</form>
[#else]
<div>不允许投稿</div>
[/#if]
</body>
</html>
